.PHONY: all clean

SRC=$(wildcard *.cpp)
OBJ=$(patsubst %.cpp, %, ${SRC})

CC=gcc
CXX=g++
CXXFLAGS=-g -O0 -I../ -I/usr/include/x86_64-linux-gnu
LDFLAGS=-Wl,--no-as-needed -lavcodec  -lavformat -lavutil -pthread

all: ${OBJ}

dpl_log_test: ../src/dpl_log.cpp

dpl_demuxer_test: ../src/demuxer.cpp ../src/dpl_log.cpp

dpl_decoder_test: ../src/demuxer.cpp ../src/decoder.cpp ../src/dpl_log.cpp

alsa_test: 

clock_reference_test:  ../src/clock_reference.cpp

audio_render_test:  ../src/audio_render.cpp ../src/dpl_log.cpp  ../src/clock_reference.cpp ../src/dpl_utility.cpp

lockfree_queue_test:

libav_link_test: 
	${CC} -c -fPIC libav_link_test.c
	${CC} libav_link_test.o ${LDFLAGS} -o libav_link_test.exe

clean:
	rm ${OBJ}
